/*----------------------------------------------------------------------------
Owner(s): Shane Whitfield
$Copyright: $
$Id: 

Purpose  : Controls game flow
----------------------------------------------------------------------------*/

#pragma once

#include "singleton.h"
#include "texture.h"
#include "subsystem.h"


/*--------------------------------------------------------------------------*/
//  Class CIntro declaration.
class CIntro : public TSingleton<CIntro>, public CSubsystem
{
	typedef CSubsystem super;

public:

			CIntro();
	void	Render();
	void	Update();
	bool	IsActive() const {
				return m_state != EState_InActive; }
	void	Activate();
	
	void RenderTitleBg();
	void RenderTitle();
	void RenderStart();
	void RenderMap();

private:

	enum EState
	{
		EState_SettingUp,
		EState_ShowTitle,
		EState_PressStart,
		
		EState_InActive,
	};
	
	void	setState(EState i_state);

	float			m_tState;
	EState			m_state;
	float			m_curStartAlpha;
	bool			m_fadingInStart;
	const CTexture*	m_titleTexture;
	const CTexture*	m_pressStartTexture;
	const CTexture*	m_titleBackground;
	Transform2D		m_worldMat;
};

inline CIntro& CIntro_GetSingleton() { return CIntro::GetSingleton(); }
#define g_intro (CIntro_GetSingleton())

/*-----------------------------------EOF!-----------------------------------*/
